'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;
    router.get('/', controller.home.index);
    router.get('/test', controller.home.test);

    router.get('/project/list', controller.project.list);
    router.post('/project/save', controller.project.save);
    router.post('/project/del', controller.project.del);

    //项目跟进
    router.post('/project/follow', controller.follow.save);
    router.post('/project/follow/list', controller.follow.list);
    router.post('/project/follow/listNum', controller.follow.getNumInfo);
    router.post('/project/follow/listNumInfo', controller.follow.getNumList);


    router.get('/task/tree', controller.task.taskTree);
    router.get('/task/list', controller.task.list);
    router.get('/task/info', controller.task.info);

    router.post('/task/save', controller.task.create);
    router.post('/task/finish', controller.task.finish);
    router.post('/task/del', controller.task.del);

    router.post('/tool/holiday/list', controller.tool.holidayList);
    router.get('/tool/holiday/init', controller.tool.holidayInit);
};
